package containers;
import java.sql.Timestamp;
import java.util.HashMap;
//This is a plain container class.
//It contains all immediate information about an appointment.

import constants.STATUS;

public class Appointment
	{
	public int ownerPersonID;
	public int appointmentID;
	public Timestamp startTime;
	public Timestamp endTime;
	public String subject;
	public String description;
	public HashMap<Integer,Integer> statuses;//STATUS mapped on personID
	public int roomID;
	public String locationName;
	public int changedTo;
	public boolean isCancelled;
	
	public Appointment(int ownerPersonID,int appointmentID,Timestamp startTime,Timestamp endTime,String subject,String description,int roomID,String locationName,int changedTo,boolean isCancelled)
		{
		this.ownerPersonID=ownerPersonID;
		this.appointmentID=appointmentID;
		this.startTime=startTime;
		this.endTime=endTime;
		this.subject=subject;
		this.description=description;
		this.roomID=roomID;
		this.locationName=locationName;
		this.changedTo=changedTo;
		this.isCancelled=isCancelled;
		statuses = new HashMap<Integer,Integer>();
		statuses.put(ownerPersonID, STATUS.OWNER);
		}
	//Get the hash key
	public AppKey getKey()
		{
		return new AppKey(ownerPersonID,appointmentID);
		}
	public HashMap<Integer,Integer> getStatuses()
		{
		return statuses;
		}
	}
